<?php

// Place in ./app/controllers/feedfolders_controller.php

class FeedfoldersController extends AppController {

  function add() {
    if (!empty($this->data)) {
      if ($this->Feedfolder->save($this->data)) {
        $this->Session->setFlash('Added');
        $this->redirect(array('action'=>'index'));
      } else {
        $this->Session->setFlash('There was a problem with your section element');
      }
    }
  } // add()

  function rename($id = NULL) {
    if (empty($this->data)) {
      $this->data = $this->Feedfolder->read(null, $id);
    } else {
      if ($this->Feedfolder->save($this->data)) {
        $this->Session->setFlash('Updated');
        $this->redirect(array('action'=>'view', $id));
      } else {
        $this->Session->setFlash('Edit error');
      }
    }
  } // rename()

  function delete($id = NULL) {
    $this->Feedfolder->delete($id);
    $this->Session->setFlash("Deleted");
    $this->redirect(array('action'=>'index'));
  } // delete()

} // class Feedfolders

?>